from pluginsystem.PluginBase import Plugin
import os.path

class Readme_debian(Plugin):
    def __init__(self):
        self.set_keyword("Readme Debian")
        self.set_mime_type("TEXT/PLAIN")
        
    def check(self, config):
        return os.path.exists(self.get_file(config))
    
    def get_file(self, config):
        docdir = self.get_documentation_path()
        basedir = config["basedir"]
        readme = "README.Debian"
        fullpath = os.path.join(docdir,basedir,readme)
        return fullpath